<template>
	<view >
		<view>
			<view>
				<zs v-for="item in list" :goditem='item' :sbimage='sbimage'  :key="item.objectId" :imagee='searchedList'></zs>
			</view>
			<!-- <button @click="get()">获取</button> -->
		</view>
	</view>
</template>

<script>
	export default {


		data() {
			return {
				id: '',
				list: [],
				searchedList: [],
				sbimage:[]
				
				
			}
		},
		async onLoad(option) {
			console.log(option)
			this.id = option
			this.data() // 输出 123
			// this.searchedList = this.lists
		
			this.image()
			console.log(this.list)
			
			
		},
		

		methods: {
			
			data() {
				// console.log(this.id)

				let url = `/1.1/classes/pccpimage/` + this.id.id
				this.$get(url).then(res => {
					uni.stopPullDownRefresh()
					// console.log(res)
					let {
						results
					} = res
					this.list = this.list.concat(res)
					// console.log(this.list)
				})
			},
			image(){
				let url = `/1.1/classes/image`
				let sburl = `/1.1/classes/sb`
				let data={where:{image_id:this.id.id}}
				console.log(this.id.id)
				this.$get(url,data).then(res => {
					uni.stopPullDownRefresh()
					console.log(res)
					let {
						results
					} = res
					this.searchedList = this.searchedList.concat(res.results)
					console.log(this.searchedList)
				})
				
				this.$get(sburl).then(res => {
					uni.stopPullDownRefresh()
					
					let {
						results
					} = res
					this.sbimage=results
					// console.log(this.sbimage)
					
				})
			}
			
			

		}
	}
</script>

<style>

</style>